xen/sched: migrate timers to correct cpus after suspend
authorJuergen Gross <jgross@suse.com>
Wed, 9 Nov 2022 10:00:04 +0000 (11:00 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 9 Nov 2022 10:00:04 +0000 (11:00 +0100)
commit1dc6dccb1a8752f200ec2612b2bd091bbf88b231
tree88407a081084cfc2cb6cbe1da259a6cdcc31d6a9
parenta524495aac037d48e3163ad29099030403298f6f
xen/sched: migrate timers to correct cpus after suspend

Today all timers are migrated to cpu 0 when the system is being
suspended. They are not migrated back after resuming the system again.

This results (at least) to visible problems with the credit scheduler,
as the timer isn't handled on the cpu it was expected to occur, which
will result in an ASSERT() triggering. Other more subtle problems, like
uninterrupted elongated time slices, are probable. The least effect
will be worse performance on cpu 0 resulting from most scheduling
related timer interrupts happening there after suspend/resume.

Add migrating the scheduling related timers of a specific cpu from cpu
0 back to its original cpu when that cpu has gone up when resuming the
system.

Fixes: 0763cd268789 ("xen/sched: don't disable scheduler on cpus during suspend")
Signed-off-by: Juergen Gross <jgross@suse.com>
Tested-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Acked-by: Dario Faggioli <dfaggioli@suse.com>
master commit: 37f82facd62f720fdcec104f72f86b8c6c214820
master date: 2022-11-04 09:03:23 +0100
xen/common/sched/core.c
xen/common/sched/cpupool.c
xen/common/sched/credit.c
xen/common/sched/private.h
xen/common/sched/rt.c